This invention relates generally to auto-coding software, and more specifically, to a reversible object code compiler for mathematical models.
Currently, the mapping between software object code and models is verified through manual review and a significant amount of analyses of the object code, the auto-code tool that generates the source code, and the compiler that generates the object code from the source code. There are three popular modeling packages that are currently available. MATLAB, the most popular software includes a C code auto-code tool called Real-Time Workshop. MATRIXx pre-dates MATLAB and includes a tool called Autocoder which can generate C source code or Ada source code from the models. SCADE is another product with similar capabilities. All three are relevant examples of the current state of auto-coding.
Control systems are often designed and validated using mathematical modeling packages such as those mentioned above. In recent years, it has become commonplace to automatically generate a software implementation of the model in a high-order language, such as C, using an auto-coder tool included in the modeling package. Typically the auto generated code (auto-code for short) preserves sufficient structure of the model to be able to map elements of the source code to the corresponding elements of the model, which could be used to reconstruct the model from the auto-code. However, it is virtually impossible to do the same after the source code has been compiled, linked and loaded as an executable image in the memory of the target computer. An ability to reconstruct a model from the executable object would enable verification that the executable object code does implement the model faithfully. Such evidence is often required of safety-critical software, and that evidence is presently constructed through labor-intensive testing and analyses.